/**
 * 
 */
package metalink.admin;

import java.util.ArrayList;

import model.admin.StudentFinanceMo;
import vo.StudentFinancialsVo;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author Sony
 * 
 */
public class EditedOnetimeFee extends ActionSupport {
int amt_paid=0,student_id;
String t_id="";
ArrayList<StudentFinancialsVo> list = new ArrayList<StudentFinancialsVo>();
ArrayList<StudentFinancialsVo> onetime = new ArrayList<StudentFinancialsVo>();
	public String execute() {
		

			StudentFinanceMo mo = new StudentFinanceMo();
			list = mo.getStudentFinancials(student_id);
			onetime=mo.getOneTimeFinancials(student_id);
			setStudent_id(student_id);
			try {
				System.out.println("came to editonetime action "+t_id+" "+amt_paid+" "+student_id);
				mo.insertOnetimeTransaction(t_id,amt_paid,student_id);
				
			} catch (Exception e) {
				addActionError(e.getMessage());
				return ERROR;
			}		
		
		return SUCCESS;
	}
	public ArrayList<StudentFinancialsVo> getList() {
		return list;
	}
	public void setList(ArrayList<StudentFinancialsVo> list) {
		this.list = list;
	}
	public ArrayList<StudentFinancialsVo> getOnetime() {
		return onetime;
	}
	public void setOnetime(ArrayList<StudentFinancialsVo> onetime) {
		this.onetime = onetime;
	}
	public int getStudent_id() {
		return student_id;
	}
	public void setStudent_id(int student_id) {
		this.student_id = student_id;
	}
	public int getAmt_paid() {
		return amt_paid;
	}
	public void setAmt_paid(int amt_paid) {
		this.amt_paid = amt_paid;
	}

	public String getT_id() {
		return t_id;
	}
	public void setT_id(String t_id) {
		this.t_id = t_id;
	}


	
}
